hysop.tools.interface module

class hysop.tools.interface.NamedObjectI(name, pretty_name=None, latex_name=None, var_name=None, **kwds)[source]

Bases: object

Create an abstract named object that contains a symbolic value. name : string

A name for the field.

pretty_name: string, optional.

A pretty name used for display whenever possible. Defaults to name.

kwds: dict

Keywords arguments for base class.

static __new__(cls, name, pretty_name=None, latex_name=None, var_name=None, **kwds)[source]

Create an abstract named object that contains a symbolic value. name : string

A name for the field.

pretty_name: string, optional.

A pretty name used for display whenever possible. Defaults to name.

kwds: dict

Keywords arguments for base class.

property latex_name

Return the latex name of this field.

abstract long_description()[source]

Long description of this field as a string.

property name

Return the name of this field.

property pretty_name

Return the pretty name of this field.

rename(name, pretty_name=None, latex_name=None, var_name=None)[source]

Change the names of this object.

abstract short_description()[source]

Short description of this field as a string.

class hysop.tools.interface.NamedScalarContainerI(name, pretty_name=None, latex_name=None, var_name=None, **kwds)[source]

Bases: NamedObjectI, SymbolContainerI

Create an abstract named object that contains a symbolic value. name : string

A name for the field.

pretty_name: string, optional.

A pretty name used for display whenever possible. Defaults to name.

kwds: dict

Keywords arguments for base class.

__contains__(obj)[source]

Check if a scalar object is contained in self.

__iter__()[source]

Return an iterator on unique scalar objects.

__tuple__()[source]

Fix hysop.tools/type.to_tuple for FieldContainers, because __iter__ has been redefined.

check_and_set_varname(var_name)[source]
nd_iter()[source]

Return an nd-indexed iterator of contained objects.

property ndim

Number of dimensions of this this tensor.

rename(name, pretty_name=None, latex_name=None, var_name=None)[source]

Change the names of this object.

property var_name

Return the variable name of this field.

class hysop.tools.interface.NamedTensorContainerI(contained_objects, **kwds)[source]

Bases: NamedObjectI, SymbolContainerI

Create an abstract named object that contains a symbolic value. name : string

A name for the field.

pretty_name: string, optional.

A pretty name used for display whenever possible. Defaults to name.

kwds: dict

Keywords arguments for base class.

__contains__(obj)[source]

Check if a scalar object is contained in self.

__iter__()[source]

Return an iterator on unique scalar objects.

__tuple__()[source]

Fix hysop.tools/type.to_tuple for FieldContainers, because __iter__ has been redefined.

iter_fields()[source]

Return an iterator on unique scalar object along with 1d index.

nd_iter()[source]

Return an nd-indexed iterator of contained objects.

property ndim

Number of dimensions of this this tensor.

new_empty_array(dtype=<class 'object'>)[source]

Return a new empty array of the same shape as self.

rename(name, pretty_name=None, latex_name=None, var_name=None)[source]

Change the names of this object.

property shape

Shape of this tensor.

property size

Full size of this container as if it was a 1D tensor.

class hysop.tools.interface.SymbolContainerI[source]

Bases: object

property s

Return a Symbol that can be used to compute symbolic expressions referring to this continuous field.

property symbol

Return a Symbol that can be used to compute symbolic expressions referring to this continuous field.